package com.heima.model.user.dtos;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

@Data
@ApiModel(description = "用户关系数据传输对象，包含文章ID、作者ID和操作类型。")
public class UserRelationDto implements Serializable {

    @ApiModelProperty(value = "文章ID", example = "12345", required = false)
    private long articleId;

    @ApiModelProperty(value = "作者ID", example = "6789", required = true)
    @NotEmpty(message = "作者ID不能为空")
    private int authorId;

    @ApiModelProperty(value = "操作类型，0 代表关注，1 代表取消关注", example = "0", required = true)
    @NotEmpty(message = "是否关注的操作类型不能为空")
    private short operation;
}